package cn.jiyun.controller;

import cn.jiyun.pojo.FenLei;
import cn.jiyun.service.FenLeiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("fenlei")
@CrossOrigin
public class FenLeiController {

    @Autowired
    private FenLeiService fenLeiService;

    @RequestMapping("findAll")
    public List<FenLei> findAll(){
        return fenLeiService.findAll();
    }

}
